package com.xinqi.modules.sys.sensitive.word.convert;

import com.xinqi.common.mapstruct.CommonConvertConfig;
import com.xinqi.modules.sys.sensitive.word.domain.SensitiveWordEntity;
import com.xinqi.modules.sys.sensitive.word.dto.req.SensitiveWordCreateDTO;
import com.xinqi.modules.sys.sensitive.word.dto.req.SensitiveWordUpdateDTO;
import com.xinqi.modules.sys.sensitive.word.dto.rsp.SensitiveWordResultDTO;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;

/**
 * 敏感词管理表转换
 *
 * @author: wenjie
 * @date: 2023/08/02
 */
@Mapper(config = CommonConvertConfig.class)
public abstract class SensitiveWordConvert {
    public abstract SensitiveWordEntity create(SensitiveWordCreateDTO s);

    public abstract SensitiveWordEntity update(SensitiveWordUpdateDTO s, @MappingTarget SensitiveWordEntity t);

    public abstract SensitiveWordEntity update(SensitiveWordUpdateDTO s);

    public abstract SensitiveWordResultDTO convert(SensitiveWordEntity s);
}
